#ifndef UICONTROL_H
#define UICONTROL_H
#include <string>
#include <vector>
#include "../QCommon/user.h"

using namespace std;

class UIControl
{
public:
    UIControl();
    ~UIControl();

    /* Get a unique instance of UIControl*/
    static UIControl& getInstance();

    /* Prompt the user to enter his or her name and gender */
    void startup_ui();

    /* This window will show the user list */
    void show_lanq_window(User &myInfo);

    /* Show the current received message */
    void new_msg_in(User &counterpart, string& msg);

    /* Ask for permission to save file */
    string ask_for_save(User &counterpart, string &filename);

    /* Update user list */
    void update_list(vector<User> &list);

    /* Thread to update user list*/
    static void* thread_update(void*);

    /* Thread to show lanq window*/
    static void* thread_lanq_window(void*);

    /* set lanq window */
    static void set_lanq_window(void*);

private:
    static UIControl instance;
    bool lanqInit;

};


#endif // UICONTROL_H
